import React from 'react';
import styles from './SideMenu.module.css';
import { sideMeunList } from "./mockup";
import { Menu } from 'antd';
import { GifOutlined } from '@ant-design/icons';

export const SideMenu: React.FC = () => {
    return (
        <Menu mode="vertical" className={styles['side-menu']}>
            {sideMeunList.map((m, index) => (
                <Menu.SubMenu
                    key={`side-menu-${index}`}
                    title={
                        <span>
                            <GifOutlined/>
                            {m.title}
                        </span>
                    }
                >
                    {m.subMenu.map((sm, smIndex) => (
                        <Menu.SubMenu
                            key={`sub-menu-${smIndex}`}
                            title={
                                <span>
                                    <GifOutlined/>
                                    {sm.title}
                                </span>
                            }
                        >
                            {sm.subMenu.map((sms, smsIndex) => (
                                <Menu.Item
                                    key={`sub-sub-menu-${smsIndex}`}
                                    title={
                                        <span>
                                            <GifOutlined/>
                                            {sms}
                                        </span>
                                    }
                                >
                                    {
                                        <span>
                                            <GifOutlined/>
                                            {sms}
                                        </span>
                                    }
                                </Menu.Item>
                            ))}
                        </Menu.SubMenu>
                    ))}
                </Menu.SubMenu>
            ))}
        </Menu>
    )
};